﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntityFrameworks.Web.Core.Models
{
    /// <summary>
    /// 标准树结构
    /// </summary>
    public class Tree
    {
        /// <summary>
        /// 节点标识
        /// </summary>
        public int ID { get; set; }
        /// <summary>
        /// 节点名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 深度，根节点深度为０
        /// </summary>
        public int Level { get; set; }
        /// <summary>
        /// 上级节点标识
        /// </summary>
        public int? ParentID { get; set; }
        /// <summary>
        /// 父对象
        /// </summary>
        public Tree Parent { get; set; }
        /// <summary>
        /// 子孙集合
        /// </summary>
        public List<Tree> Sons { get; set; }
    }
}
